package com.example.shardingdemo.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.shardingdemo.dao.UserMapper;
import com.example.shardingdemo.entity.User;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @author: 奕仁
 * @date: created in 2020-12-14 22:54
 * @version: v1.0
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public boolean save(User entity) {
        return super.save(entity);
    }

    @Override
    public List<User> getUserList() {
        return baseMapper.selectList(Wrappers.<User>lambdaQuery());
    }
}
